package com.fjut.controller;

import com.fjut.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;

@Api(tags = "登录接口")
@RestController
@RequestMapping("/fjut/vod/user")
//@CrossOrigin
public class UserLoginController {


    @ApiOperation("登录")
    @PostMapping("login")
    public Result login(){
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("token","admin-token");
        return Result.success(hashMap).message("登录成功");
    }

    @ApiOperation("信息")
    @GetMapping("info")
    public Result info(){
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("roles","admin");
        hashMap.put("introduction","我是超级管理员");
        hashMap.put("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
        hashMap.put("base","基于微信公众号开发的线上教学平台");
        return Result.success(hashMap);
    }

    @PostMapping("logout")
    public Result logout(){
        return Result.success(null);
    }
}
